package cn.iocoder.ny.module.mall.domain.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class MallWeChatPayVo {
    private static final long serialVersionUID = 1L;

    //微信openId(小程序唯一标识)
    @NotBlank(message = "openId不允许为空" ,groups = {PrepayByJsapi.class})
    private String openId;

    @NotNull(message = "金额不允许为空",groups = {PrepayByJsapi.class,RefundsByOutTradeNo.class})
    private int total;

    /**
     * 商户订单号
     */
    @NotBlank(message = "订单号不允许为空",groups = {RefundsByOutTradeNo.class,QueryByOutTradeNo.class,CloseByOutTradeNo.class})
    private Long orderNo;


    //商品描述
    private String description;


    //微信appid(小程序唯一标识)
    @NotBlank(message = "appid不允许为空",groups = {RefundsByOutTradeNo.class,PrepayByJsapi.class,QueryByOutTradeNo.class,CloseByOutTradeNo.class,RefundsQueryByOutRefundNo.class})
    private String appid;

    /**
     * 附加数据
     */
    private String attach;

    /**
     * 退款单号
     */
    @NotBlank(message = "退款单号不允许为空",groups = {RefundsByOutTradeNo.class})
    private String outRefundNo;

    /**
     * 退款金额
     */
    @NotNull(message = "退款金额不允许为空",groups = {RefundsByOutTradeNo.class})
    private int refund;

    //lg 支付模块 下预订单 时查 DB配置
    private Long tenantId;


    public interface PrepayByJsapi {}

    public interface QueryByOutTradeNo{}

    public interface CloseByOutTradeNo{}

    public interface RefundsByOutTradeNo{}

    public interface RefundsQueryByOutRefundNo{}
}
